package com.prd.controller;

import com.prd.dto.SupervisorVo;
import com.prd.model.EntTaskPeriodic;
import com.prd.service.EntTaskPeriodicService;
import com.prd.util.AjaxResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Api(tags = "任务阶段性汇报")
@RestController
@RequestMapping("/api/entTaskPeriodic")
public class EntTaskPeriodicController extends BaseController {

    @Autowired
    private EntTaskPeriodicService entTaskPeriodicService;

    @ApiOperation("添加阶段性汇报")
    @PostMapping(value = "add")
    public AjaxResult add(@RequestBody EntTaskPeriodic entTaskPeriodic) {
        return toAjax(entTaskPeriodicService.insertInfo(entTaskPeriodic));
    }

    @ApiOperation("添加督导审核结果")
    @PostMapping(value = "addSupervisor")
    public AjaxResult addSupervisor(@RequestBody SupervisorVo supervisorVo) {
        return toAjax(entTaskPeriodicService.addSupervisor(supervisorVo));
    }
}
